#ifndef _GlsxCommon_RefCountedObject_H_
#define _GlsxCommon_RefCountedObject_H_


#include "Core/AtomicCounter.h"


BEGIN_GLSX_NAMESPACE

class GlsxCommon_API RefCountedObject
{
public:
	RefCountedObject();

	void duplicate() const;
		
	void release() const;
		
	int referenceCount() const;

protected:
	virtual ~RefCountedObject();

private:
	RefCountedObject(const RefCountedObject&);
	RefCountedObject& operator = (const RefCountedObject&);

	mutable AtomicCounter _counter;
};


END_GLSX_NAMESPACE

#endif 
